import { useEffect } from 'react';
import { useParams, useSelector, useDispatch } from 'dva';
import { useIntl, getLocale } from 'umi';
import moment from 'moment';

import BackgroundImage from '../../../assets/my/role-select.png';

import styles from './role-select.less';

const RoleSelect = () => {
  const dispatch = useDispatch();

  return (
    <>
      <div className={styles.page}>
        <div className={styles.loginBox}>
          <div className={styles.title}>账号密码登录</div>
          <div
            className={styles.btn}
            onClick={() => {
              dispatch({
                type: 'index/setState',
                payload: {
                  loginModalShow: true,
                  roleSelectModalVisible: false,
                  loginTypeIndex: 0,
                },
              });
            }}
          >
            我是展商
          </div>
          <div className={styles.title}>手机验证码登录</div>
          <div
            className={styles.btn}
            onClick={() => {
              dispatch({
                type: 'index/setState',
                payload: {
                  loginModalShow: true,
                  roleSelectModalVisible: false,
                  loginTypeIndex: 1,
                },
              });
            }}
          >
            我是观众
          </div>{' '}
        </div>
      </div>
    </>
  );
};

export default RoleSelect;
